home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-04 | 2.9 KB | 62 lines | [TEXT/GEOL] |
- Item 2266620 2-May-90 15:34PDT
-
- From: STRONG.S Strong, Steve
-
- To: D0314 Imageering Optical Disk Sys,PRT
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: Are you still interested?
-
- Reece:
-
- Wow, I took way too long to answer your link! I have all kinds of plausible
- excuses, but you wouldn't believe any of them. Here is the original link:
-
- (************************************************************************)
- Thanks for the information! I called ShowReverted because that is how the
- DemoText example that came with 2.0ß9 does it. An open is all I need. I had
- figured out that I needed to open the window, not my view, but I did it by
- having a 'fMyWindow: TWindow' field in my document as well as an fMyView field.
- Is there any reason to keep the window field around? i.e. Will most of the
- messages I instigate go to my view or to it's window? Also shouldn't your
- example do a 'FailNIL(aTEView)' after the FindSubView?
-
- I am still not sure why a call to any of 'TView.DrawContents'
- 'TView.ForceRedraw', 'TView.Show', or 'TView.ViewEnable' would not work,
- espcially TView.Show, but they don't. Oh well on to Cohandlers!!
- (************************************************************************)
-
- Just in case you are still interested in this stuff, here goes:
-
- In general, there is no reason to keep the fMyWindow field around. Most (if
- not exactly all) of the communication is done between the document and the
- view. I don't remember the original problem, but MacApp usually takes care of
- openning your windows after calling the DoMakeViews method of your document.
- You needed to call the Open method of your window because you created it
- outside of the usual process of openning a document first.
-
- Concerning the use of FailNIL(), this routine checks to make sure that there
- was memory available for the creation of a new object (in other words, it
- checks, among other things, to see if NEW returned NIL). However, FindSubView
- does not create a new object, it just returns a reference to an object that
- already exists (a subview, in this case, with the appropriate identifier). So,
- you don't need to use FailNIL on a reference returned from FindSubView.
-
- Finally, concerning all those other routines (DrawContents, Show, etc) you
- generally don't call any of these yourself (except ForceReDraw, which you
- frequently use). Instead, you provide a draw method and allow MacApp to make
- sure it is called at the appropriate times. A real answer to this question
- would take more time/space than AppleLink allows. If you are still confused
- (and I think I would be!) you might try reading some of the books written about
- MacApp including the most recent one: Programming with MacApp by David Wilson
- et al and published by Addison Wesley. It should be available in bookstores
- very soon.
-
- Hope this very late response helps.
-
- Steve Strong
- Developer University
-
-
-